<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 00:33:05
 * @LastEditTime: 2023-11-03 15:56:09
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: BOM成品工艺
 */

namespace App\Models;

use App\Traits\CarryTrait;
use App\Traits\CarTrait;
use App\Traits\AutoCodeTrait;
use App\Traits\MaterialTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class ProOutsourcingFinish extends PurchaseStorage
    {

    protected $_instorage_way_id = 3;

    public $ACSign = "PRO_OUT_FINISH";
    public function product()
        {
        return $this->hasOne(ProOutsourcingProduct::class, "finish_code", "code");
        }
    public function details()
        {
        return $this->hasMany(ProOutsourcingFinishDetail::class, "main_id");
        }
    /**
     * Summary of carry
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     * @author sunkaiyuan
     */
    public function carry()
        {
        return $this->belongsTo(ComprehensiveCarry::class);
        }
    /**
     * Summary of car
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     * @author sunkaiyuan
     */
    public function car()
        {
        return $this->belongsTo(ComprehensiveCar::class);
        }
    }